package liming.tool.json;

public interface ToJson extends JsonSerializer, JsonDeserializer{
    default <T extends ToJson> void deserialize(T toJson){
        deserialize(toJson.serializeBody(toJson.getDefaultClass()));
    }
    default <T extends ToJson> T valueOf(T obj){
        obj.deserialize(this);
        return obj;
    }
}
